package com.framework.tomcat.ex03.pyrmont.core;

import org.apache.catalina.Context;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;

/**
 * @author LIN
 * @date 2022-08-30 21:30
 */
public class SimpleContextConfig implements LifecycleListener {


    @Override
    public void lifecycleEvent(LifecycleEvent event) {
        if(Lifecycle.START_EVENT.equals(event.getType())){
            Context context = (Context) event.getLifecycle();
            context.setConfigured(true);

        }
    }
}
